home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.awt;
-
- import java.awt.Label;
- import symantec.itools.db.pro.ProjBinder;
- import symantec.itools.db.pro.Record;
- import symantec.itools.db.pro.RecordLink;
- import symantec.itools.db.pro.RelationView;
- import symjava.sql.SQLException;
-
- public class RecordNumberLabel extends Label implements RecordLink {
- ProjBinder m_ProjBinder;
-
- public RecordNumberLabel() {
- super("<Record Number Label>");
- }
-
- public void init() {
- ((Label)this).setText("Invalid");
- }
-
- public void notifyRecordChange(Record currentRecord) throws SQLException {
- if (currentRecord != null && currentRecord.getRelationView() != null) {
- ((Label)this).setText(currentRecord.getRelationView().getCurrentRecordNumberString());
- }
-
- }
-
- public void setRelationView(RelationView rv) {
- try {
- rv.bindCurrentRecord(this);
- } catch (SQLException ex) {
- System.out.println(((Throwable)ex).getMessage());
- }
- }
- }
-